From 55d708b41c87930de009573d71b888cd45091033 Mon Sep 17 00:00:00 2001 From: "cl349@freefall.cl.cam.ac.uk" Date: Thu, 16 Sep 2004 09:32:52 +0000 Subject: [PATCH] bitkeeper revision 1.1159.1.153 (41495dc4v3GzGJz41U0jh2uqLzhlIw) Fix ping with large/fragmented packets from domU to dom0. --- linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c b/linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c index 44aa8e9dde..6de5cc51fd 100644 --- a/linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c +++ b/linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c @@ -393,11 +393,12 @@ static int network_start_xmit(struct sk_buff *skb, struct net_device *dev) tx->size = skb->len; wmb(); /* Ensure that backend will see the request. */ - np->tx->req_prod = i + 1; + i++; + np->tx->req_prod = i; network_tx_buf_gc(dev); - if ( (i - np->tx_resp_cons) == (NETIF_TX_RING_SIZE - 1) ) + if ( (i - np->tx_resp_cons) == NETIF_TX_RING_SIZE ) { np->tx_full = 1; netif_stop_queue(dev); @@ -410,7 +411,7 @@ static int network_start_xmit(struct sk_buff *skb, struct net_device *dev) /* Only notify Xen if there are no outstanding responses. */ mb(); - if ( np->tx->resp_prod == i ) + if ( np->tx->resp_prod != i ) notify_via_evtchn(np->evtchn); return 0; -- 2.30.2